home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / cosmicfozmik.swf / scripts / frame_7 / PlaceObject2_150_13 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-09-27  |  1.4 KB  |  68 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.gameOver == 1)
  3.    {
  4.       _visible = false;
  5.       _X = _X + 5000;
  6.    }
  7.    if(_root.bossFight == 1)
  8.    {
  9.       if(_X > 550)
  10.       {
  11.          _X = _X - 4;
  12.       }
  13.       else
  14.       {
  15.          engage = 1;
  16.       }
  17.       if(engage == 1)
  18.       {
  19.          if(_root.newBehaviorTime > 0)
  20.          {
  21.             _root.newBehaviorTime--;
  22.          }
  23.          if(_root.newBehaviorTime == 0)
  24.          {
  25.             behavior = random(3);
  26.             if(behavior == 0)
  27.             {
  28.                hand2.gotoAndPlay(2);
  29.             }
  30.             if(behavior == 1)
  31.             {
  32.                hand1.gotoAndPlay(2);
  33.             }
  34.             if(behavior == 2)
  35.             {
  36.                head.gotoAndPlay(2);
  37.             }
  38.             _root.newBehaviorTime--;
  39.          }
  40.          if(moveHead == 1)
  41.          {
  42.             if(headWay == 0)
  43.             {
  44.                if(head._y > headUp)
  45.                {
  46.                   head._y -= 2;
  47.                }
  48.                else
  49.                {
  50.                   headWay = 1;
  51.                }
  52.             }
  53.             if(headWay == 1)
  54.             {
  55.                if(head._y < headDown)
  56.                {
  57.                   head._y += 2;
  58.                }
  59.                else
  60.                {
  61.                   headWay = 0;
  62.                }
  63.             }
  64.          }
  65.       }
  66.    }
  67. }
  68.